home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1987 March
/
Ahoy_Magazine_87-03_1987_Double_L.d64
/
Bad Luck
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
464b
|
16 lines
0 print"[147]":poke53280,0:poke53281,0:poke646,1
1 rem commodares problem #35-4:
2 rem bad luck
3 rem solution by
4 rem karen middaugh
5 rem
10 dim p(12) : for j=1 to 12 : read p(j):next
20 input"year: 19";y: input "month (1-12): ";m:input "day: ";d:if d>12 then 70
30 l=int((y+3)/4):da=6+y+l+p(m)+13: if int(y/4)=y/4 and m>2 then da=da+1
40 da=int((da/7-int(da/7))*7+.5)
50 if da=5 then print"the next friday the 13th is"m"/13/"y :end
60 d=13
70 m=m+1:if m>12 then m=1:y=y+1
80 goto 30
90 data 0,3,3,6,1,4,6,2,5,7,3,5